<?php
    require "commen.php";

    $id=$_GET['id'];
    if($_POST){
        $title=$_POST['title'];
        $content=$_POST['content'];
        $time=time();
        mysql_query("update `article` set `title`='$title',`content`='$content',`time`='$time'  where `id`='$id'");
        echo "<script>alert ('修改成功');location.href='index.php';</script>";


    }
    $result=mysql_query("select *from `article` where id='$id'");
    $article=mysql_fetch_assoc($result);
    require "templates/edit.html";





?>